  import React, { Component } from 'react'
  import { Layout } from 'antd'
  import { Inifmain } from '../router'
  import MySider from '../compontents/sider'
// import { relative } from 'upath'
  const { Header, Content, Sider } = Layout
  class layoutsDetault extends Component {
    // constructor(){
      // super(props)
      // this.state = {
      //   loggedUser: {}
      // }
    // }
    // 组件初始化时调用
    componentWillMount(){
      let loggedUser = localStorage.getItem('LOGGED_USER')
      if (loggedUser) {
        // this.setState({loggedUser: JSON.parse(loggedUser)})
      }else{
        this.props.history.push('/logo')
      }
    }
    render() {
      return (
        <Layout>
          <Sider style={{overflow: 'auto', height: '100vh', position: 'fixed', left: 0,}} >
            <MySider/>
          </Sider>
          <Layout style={{marginLeft: 200, height: '100vh'}}>
            <Header style={{height: '72px',adding: 0 }} >
            <div style={{position: 'fixed',top: 0, left: '200px', zIndex: 5,width: '100%', height: '72px', background: '#fff', padding: 0 }} >美丽雅积分商城管理后台V1.0</div> 
            </Header>
            <Content style={{ margin: '24px 16px 0', overflow: 'initial' }}>
              <Inifmain/>
            </Content>
          </Layout>
        </Layout>
      )
    }
  }
  export default layoutsDetault
  



